#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void selection_sort(int arr[], int sz)
{
	int* p = arr;
	for (int i = 0; i < sz; i++)
	{
		for (int j = i+1; j < sz; j++)
		{
			if (p[j] < p[i])
			{
				int temp = p[i];
				p[i] = p[j];
				p[j] = temp;
			}
		}
	}
	for (int i = 0; i < sz; i++)
	{
		printf("%d\n", *(p++));
	}
}


int main()
{
	int arr[10] = { 0 };
	int sz = 0;
	int* p = arr;
	sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 0; i < sz; i++)
	{
		scanf("%d", p++);
	}
	selection_sort(arr, sz);
	return 0;
}







